from django.db import migrations, models

class Migration(migrations.Migration):
    dependencies = [
        ('app01', '0005_patientmeal'),
    ]

    operations = [
        migrations.RunSQL(
            """
            CREATE TABLE IF NOT EXISTS patient_meal (
                id INTEGER PRIMARY KEY AUTOINCREMENT,
                patient_number VARCHAR(50) NOT NULL,
                time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
                meal_type VARCHAR(20) NOT NULL,
                cho REAL NOT NULL,
                pre_meal_bolus REAL NOT NULL,
                notes TEXT NULL
            );
            """,
            "DROP TABLE IF EXISTS patient_meal;"
        ),
    ] 